<?php require_once 'header.php';?>    
<!-- DataTables Responsive CSS -->
    <link href="sb2/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                        <?php echo XXF_BACK?>
                            收费情况：
                            <span class="xxf_red">
                            	<?php echo xdb::getInstance()->getvar("select pname from peixunban where id=".$pid)?>
                            	(合计已收：<?php echo xdb::getInstance()->getvar("select sum(xuefei) from peixunxueyuan where pid=".$pid)?>)
                            </span>
                            <a href="fxy_sf/type/down/pid/{{$pid}}">下载本表</a>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>工作单位</th>
                                        <th style="min-width: 60px;">姓名</th>
                                        <th>电话</th>
                                        <th>收费</th>
                                        <th>财务收费床位类型</th>
                                        <th>招待所床位类型</th>
                                        <th>财务备注</th>
                                        <th>招待所备注</th>
                                        <th>是否欠费</th>
                                        <th>入住时间</th>
                                        <th>入住房间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	<?php
                                	$i=0;
                                	foreach ($result as $row){$i++;
                                	?>
                                    <tr class="<?php echo $i%2==0?"even":"odd";?> gradeA  " id='<?php echo $row['id'];?>' <?php echo $row['flevel']!=$row['zlevel']?"style='background-color:pink;'":"" ?>>
                                    	<td><?php echo $row['id'];?></td>
                                        <td><?php echo $row['workunit'];?></td>
                                        <td><a href="syspxserch/puid/<?php echo $row['id'];?>"><?php echo $row['puname'];?></a></td>
                                    	<td><?php echo $row['mphone'];?></td>
                                        <td><?php echo $row['xuefei'];?></td>
                                        <td><?php echo $row['flevel'];?></td>
                                        <td><?php echo $row['zlevel'];?></td>
                                        <td><?php echo $row['fbeizhu'];?></td>
                                        <td><?php echo $row['zbeizhu'];?></td>
                                        <td><?php echo $row['qianfei'];?></td>
                                        <td><?php echo $row['ztime'];?></td>
                                        <td><?php echo $row['fangnum'];?></td>
                                        <td style="min-width: 44px;"><a href="fxy_add/puid/<?php echo $row['id']?>">收费</a></td>
                                    </tr>
                                	<?php 
                                	}
                                	?>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
             </div>
        </div>
        <!-- /#page-wrapper -->
  </div>
        <!-- DataTables JavaScript -->
<?php require_once 'bottom.php';?>
    <script src="sb2/vendor/datatables/js/jquery.dataTables.js"></script>
    <script src="sb2/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
    <script src="sb2/vendor/datatables-responsive/dataTables.responsive.js"></script>
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true,
            "aaSorting": [[ 9, "desc" ],[0,"desc"]],
            "aLengthMenu": [ 200, 100, 50, 10 ]//财务要欠费的在前，每页也要显示200条记录
        });
    });
 
    </script>